

public class Main {
    public static void main(String[] args) {
        Student s1 = new Student();
        System.out.println(s1);
    }

//    private int count;
//
//    public static void main(String[] args) {
//
//        Main test=new Main(88);
//
//        System.out.println(test.count);
//
//    }
//
//    Main(int a) {
//
//        count=a;
//
//    }


    public static void main3(String[] args) {
        Student s1 = new Student();
        Student.i++;//i = 2
        System.out.println(Student.i++);//i = 3
        System.out.println(Student.i++);//i = 4
        System.out.println(Student.i += 3);//i = 7
        Student s2 = new Student();
        //执行了构造代码 i++
        //因为静态代码只执行一次
        System.out.println(Student.i);//i = 8
    }
}
//    public static void main2(String[] args) {
//
//        Student s1 = new Student("an",20);
//        System.out.println(s1.toString());
//    }
//
//    public static void main1(String[] args) {
//        Student s1 = new Student("an",20);
//        System.out.println("=========");
//        Student s2 = new Student("la",10);
//    }
//}




















//    public static void main1(String[] args) {
//        Student student1 = new Student("zangsan",10);
//        Student student2 = new Student("Lisi",11);
//        Student student3 = new Student("wangwu",13);
//
//        //使用静态变量
//        //System.out.println(student1.className);
//        //System.out.println(student2.className);
//        //System.out.println(student3.className);
//        //通过类名访问
//        System.out.println(Student.className);
//
//        //调用静态方法
//        Student.func1();
//    }
